const mongoose = require('mongoose');
//用户的表结构
const userSchema = new mongoose.Schema({
    username: {
        type: String,
        required: true
    },
    password: {
        type: String,
        required: true
    },
    nickname: {
        type: String,
        default: '新用户'
    },
    avatar: {
        type: String,
        default: 'http://localhost:3000/images/user/avatar.svg'
    },
    signatrue: {
        type: String,
        default: ''
    },
    sex: {
        type: String,
        default: ''
    },
    isAdmin: {
        type: Boolean,
        default: false
    }
})

module.exports = mongoose.model('user', userSchema);